#include"enumeration.h"
#include"pl.h"
#include"dimacsFile.h"
#include"vertexOrders.h"
#include"bitMapGraph.h"
#include<stdio.h>

int n;
int m;
extern long set;
extern long violates;
FILE* out;


int main(){
	FILE* file = fopen("instance.clq", "r");
	int i,j;
	out = fopen("saida.txt","w");
	if(!readFile(file, complement, &n, &m)){
        printf(" numero de vertices %d \n", n);
		printf(" numero de arestas %d \n", m);
		int* c = malloc(sizeof(int)*n);
		mcrStableSort(n, c);
		fprintf(out,"ordem dos vertices no conjunto\n");
		for(j=0; j<n;j++){
			fprintf(out," %lu  \n", va[j]+1 );
		}
		fprintf(out,"\n arestas do conjunto\n");
		for(i = 0; i<n; i++){
			for(j=i; j<n;j++){
				if(hasEdge(va[i], va[j]))fprintf(out,"aresta %lu--%lu  \n", va[i]+1, va[j]+1);
			}
		}
		makePL();
		addConstrainsForVertex(0);
		addRepresentantConstrain(0);
	}else{
		printf("Problemas para ler o arquivo");
	printf("\n cheguei msm");
		return 1;
	}

	return 0;
}

